package com.travelsky.login.service;

import com.travelsky.login.domain.Account;
import com.travelsky.login.domain.AccountDisabledException;
import org.springframework.stereotype.Component;

@Component
class AccountStatusVerifier implements AccountVerifier{

  @Override
  public void verify(Account account) {
    if (account.isLocked()) {
      throw new AccountDisabledException("00002", "该用户被禁用!");
    }
  }
}
